# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=sherlock
_pypi_name=sherlock-project
_pypi_archive=sherlock_project
pkgver=0.16.0
pkgrel=1
epoch=1
pkgdesc='Find usernames across social networks.'
groups=('blackarch' 'blackarch-social' 'blackarch-recon')
arch=('any')
url='https://github.com/sherlock-project/sherlock'
license=('MIT')
depends=('python' 'python-certifi' 'python-colorama' 'python-pysocks'
         'python-requests' 'python-requests-futures' 'python-stem'
          'python-torrequest' 'python-pandas' 'python-openpyxl')
makedepends=('python-build' 'python-pip')
source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/$_pypi_name/$_pypi_archive-$pkgver.tar.gz")
sha512sums=('4ae1547f69b040fed68049902e9c75c3dedb512ff6305c214909293ad5d02910f80e736f405e8d616991aaaafb75b208cba7fc6c99d926d0973bae1068196082')

build() {
  cd "$_pypi_archive-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pypi_archive-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pypi_name
}

